﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ToString
{
    class Program
    {
        static void Main(string[] args)
        {
            //Int32 n = 5615165;
            //int min = 0;
            ////for (; ; min++)
            ////{
            ////    Console.WriteLine("input min:");
            ////    min = Console.Read();
            ////    theNumber Num = new theNumber();
            ////    for (int i = 1; i <= 5; i++)
            ////    {
            ////        min=Num.Min(min);
            ////    }
            //Program w = new Program();
            //w.F(min);
            //    Console.WriteLine(min);
            ////}

            Weekday day;
            day = (Weekday)3;
            Console.WriteLine(day);
            Console.WriteLine("--------");
            IHello h = new Dive();
            h.Hello();
            Console.WriteLine("--------");
            Base b = new Base();
            b.Hello();
            //Console.WriteLine("--------");
            //Base w = new Dive();
            //w.Hello();
            Console.WriteLine("--------");
            Dive d = new Dive();
            d.Hello();
            Console.WriteLine("--------");

            int i = 10;
            object obj = i;
            if (obj is int)
            {
                Console.WriteLine("i is boxing");
            }
            i = 20;
            Console.WriteLine(i);
            Console.WriteLine(obj);

            Console.ReadKey();
        }

        public void F(int n)
        {
            if (n > 0 && n == int.Parse(n.ToString()))
            {
                return;
            }
            else
            {
                n = int.Parse(n.ToString()) * 4;
                F((n - 1) * 4 / 5);
            }
        }
    }
    class theNumber
    {
        public int Min(int n)
        {
            n = Min((n + 1) * 5 / 4);
            return n;
        }
    }
    #region Weekday
    enum Weekday
    {
        Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    }
    #endregion

    #region IHello
    interface IHello
    {
        void Hello();
    }
    class Base : IHello
    {
        public virtual void Hello()
        {
            Console.WriteLine("Hello in base");
        }
    }
    class Dive : Base
    {
        public new void Hello()
        {
            base.Hello();
            Console.WriteLine("Hello in Dive");
        }
    }
    #endregion

#region Object Boxing
    
#endregion
}
